
const script = document.createElement('script')

const serverHost = '${serverHost}';
script.onload = () => {
    const socket = io(serverHost + '?roomid=log');

    socket.on('browserLog', (...a) => {
        console.log(...a);
    })
    socket.on('browserErr', (...a) => {
        console.error(...a);
    })
    socket.on('connect', () => {
        console.log('日志输出已就绪')
    })
}
script.async = true;
script.src = serverHost + '/socket.io/socket.io.js'
document.head.appendChild(script)